
        <!-- end sidebar -->
        <link rel="stylesheet" href="admin/css/compiled/user-list.css" type="text/css" media="screen" />
        <!-- main container -->
        <div class="content">
            <div class="container-fluid">
                <div id="pad-wrapper" class="users-list">
                    <div class="row-fluid header">
                        <h3>会员列表</h3>
                        <div class="span10 pull-right">
                            <a href="<?php echo yii\helpers\Url::to(['user/reg']);?>" class="btn-flat success pull-right">
                                <span>&#43;</span>添加新用户</a>
                        </div>
                    </div>
                    <!-- Users table -->
                    <div class="row-fluid table">
                        <table class="table table-hover">
                            <thead>                
                                <tr>
                                    <th class="span3 sortable">
                                        <span class="line"></span>用户名</th>
                                    <th class="span3 sortable">
                                        <span class="line"></span>真实姓名</th>
                                    <th class="span2 sortable">
                                        <span class="line"></span>昵称</th>
                                    <th class="span3 sortable">
                                        <span class="line"></span>性别</th>
                                    <th class="span3 sortable">
                                        <span class="line"></span>年龄</th>
                                    <th class="span3 sortable">
                                        <span class="line"></span>生日</th>
                                    <th class="span3 sortable align-right">
                                        <span class="line"></span>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <!-- row -->
                                <?php foreach($user as $row):?>
                                <tr class="first">
                                    <td>
                                        <img src="admin/img/contact-img.png" class="img-circle avatar hidden-phone" />
                                        <a href="#" class="name"><?php echo $row->username?></a>
                                        <span class="subtext"></span>
                                    </td>
                                    <td><?php echo isset($row->profile->truename)? $row->profile->truename : '未填写';?></td>
                                    <td><?php echo isset($row->profile->nickname)? $row->profile->nickname : '未填写';?></td>
                                    <td><?php
                                         if(isset($row->profile->sex)){
                                                if($row->profile->sex == 1){
                                                    echo '男';
                                                }else if($row->profile->sex == 2){
                                                    echo '女';
                                                }else{
                                                    echo '保密';
                                                }
                                         }else{
                                            echo "未填写";
                                         }
                                    ?></td>
                                    <td><?php echo isset($row->profile->age)? $row->profile->age : '未填写';?></td>
                                    <td><?php echo isset($row->profile->birthday)? $row->profile->birthday : '未填写';?></td>
                                    <td class="align-right">
                                        <a href="<?php echo yii\helpers\Url::to(['user/del','id'=>$row->userid])?>">删除</a></td>
                                </tr>
                            <?php endforeach?>
                            </tbody>
                        </table>
                    </div>
                    <?php if(Yii::$app->session->hasFlash('info')){
                            echo Yii::$app->session->getFlash('info');
                       } ?>
                    <div class="pagination pull-right">
                        <?php echo yii\widgets\LinkPager::widget(['pagination'=>$pages]);?>
                    </div>
                    <!-- end users table -->
                    </div>
            </div>
        </div>
        <!-- end main container -->
